package com.lianjinsu.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.lianjinsu.shop.entity.enums.OrderStatus;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;

import java.math.BigDecimal;
import java.util.List;

@Getter
@Setter
@TableName(value = "orders")
@Alias(value = "Orders")
public class Orders extends Model<Orders> {
    private static final long serialVersionUID = 3273554992864558411L;

    private String openid;

    @TableId(type = IdType.INPUT)
    private String tradeSn;

    private String goodsInfoList;

    private OrderStatus status;

    private String code;

    private BigDecimal totalPrice;

    private String discount;

    private String createTime;

    @TableField(exist = false)
    private List<OrdersRef> ordersRefList;
}
